Use a GtkAlignment rather than a GtkDrawingArea to draw the swatch in to
authorOwen Taylor <otaylor@redhat.com>
Thu, 12 May 2005 01:12:19 +0000 (01:12 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Thu, 12 May 2005 01:12:19 +0000 (01:12 +0000)
2005-05-11  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkcolorbutton.c: Use a GtkAlignment rather than a GtkDrawingArea
        to draw the swatch in to avoid having an extraneous window.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-8
tests/testgtk.c

index 9dd0685777476870732ab04b10648879bf781af7..6854dc7bd91d949a496d89160d80da1ecd490dfe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-05-11  Owen Taylor  <otaylor@redhat.com>
+
+       * tests/testgtk.c (on_alpha_window_expose): Fix to use
+       gdk_cairo_create(). (create_alpha_window): Hook up "response"
+       to close the window.
+
 2005-05-11  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkcolorbutton.c: Use a GtkAlignment rather than a GtkDrawingArea
index 9dd0685777476870732ab04b10648879bf781af7..6854dc7bd91d949a496d89160d80da1ecd490dfe 100644 (file)
@@ -1,3 +1,9 @@
+2005-05-11  Owen Taylor  <otaylor@redhat.com>
+
+       * tests/testgtk.c (on_alpha_window_expose): Fix to use
+       gdk_cairo_create(). (create_alpha_window): Hook up "response"
+       to close the window.
+
 2005-05-11  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkcolorbutton.c: Use a GtkAlignment rather than a GtkDrawingArea
index 9dd0685777476870732ab04b10648879bf781af7..6854dc7bd91d949a496d89160d80da1ecd490dfe 100644 (file)
@@ -1,3 +1,9 @@
+2005-05-11  Owen Taylor  <otaylor@redhat.com>
+
+       * tests/testgtk.c (on_alpha_window_expose): Fix to use
+       gdk_cairo_create(). (create_alpha_window): Hook up "response"
+       to close the window.
+
 2005-05-11  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkcolorbutton.c: Use a GtkAlignment rather than a GtkDrawingArea
index b4480be8d49d9c36745359e893085eb8afd99efa..a731b7270dab0902a21374c456866a6141e5e75c 100644 (file)
@@ -160,7 +160,7 @@ on_alpha_window_expose (GtkWidget      *widget,
   cairo_pattern_t *pattern;
   int radius;
 
-  cr = gdk_drawable_create_cairo_context (widget->window);
+  cr = gdk_cairo_create (widget->window);
 
   radius = MIN (widget->allocation.width, widget->allocation.height) / 2;
   pattern = cairo_pattern_create_radial (widget->allocation.width / 2,
@@ -391,6 +391,10 @@ create_alpha_window (GtkWidget *widget)
       g_signal_connect (window, "destroy",
                        G_CALLBACK (gtk_widget_destroyed),
                        &window);
+      
+      g_signal_connect (window, "response",
+                        G_CALLBACK (gtk_widget_destroy),
+                        NULL);
     }
 
   if (!GTK_WIDGET_VISIBLE (window))